
<head><meta http-equiv="refresh" content="3; url=http://localhost/hotel/admin/register/room.php">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /></head>
<?php  header('Content-type: text/html; charset=utf-8');
$mysql_server_name = "localhost";
$mysql_username = "root";
$mysql_password = "root";
$mysql_database = "db_shop";

$room_id = $_POST['id'];$room_type = $_POST['room'];$room_status=$_POST['status'];$room_area=$_POST['area'];$room_cost=$_POST['cost'];
$description=$_POST['description'];
$conn=mysql_connect($mysql_server_name,$mysql_username,$mysql_password);
$sql = "INSERT INTO `hotel`.`room` (`room_id`,`room_type`, `room_status`,`room_area`,`room_cost`,`description`) VALUES ('$room_id','$room_type', '$room_status','$room_area', '$room_cost', '$description')";
   mysql_query ("set names 'utf8'");
    mysql_select_db($mysql_database);
   $result=mysql_query($sql);
   if($result == "")
   echo "出现错误,添加失败";
    else
	{
    echo '添加信息成功';
    }
/*	
	 
	*/
?>

